# !/usr/bin/python3
# -*- coding: utf-8 -*-

"""
角色信息表模型类
----------------------------------------------------
@Project :   xinhou-openai-framework
@File    :   Role.py
@Contact :   sp_hrz@qq.com

@Modify Time      @Author    @Version    @Desciption
------------      -------    --------    -----------
2023/04/16 22:04  peng.shen   v1.0.0     None
"""

from sqlalchemy import ForeignKey
from sqlalchemy import func

from sqlalchemy import Column, Integer, String, Text, Numeric, TIMESTAMP
from xinhou_openai_framework.core.orm.entity.BaseEntity import BaseEntity


class Role(BaseEntity):
    # 数据表名&字段
    __tablename__ = 't_role'

    role_name = Column(String(30), comment="角色名称")
    role_key = Column(String(100), comment="角色权限字符串")
    role_sort = Column(Integer, comment="显示顺序")
    data_scope = Column(Integer, default='1', comment="数据范围:1=全部数据权限,2=自定数据权限")
    status = Column(Integer, comment="角色状态:1=正常,2=停用")
    remark = Column(String(500), comment="备注")